import request from '@/utils/request'

// export const useVacation = (data) => {
//   return request.post({ url: '/oa/user-leave/surplusDay', data })
// }

// 创建请假申请
// export const createLeave = async (data: LeaveVO) => {
//   return await request.post({ url: '/bpm/oa/leave/create', data: data })
// }

// 请假申请
export function createLeave(data) {
  return request({
    url: '/bpm/oa/leave/create',
    method: 'post',
	data
  })
}

// 获得请假申请分页
export const getLeavePage = async (data) => {
  return request({
    url: '/bpm/oa/leave/page',
    method: 'get',
  	data
  })
}

// 获取请假详情
export const getLeave = async (data) => {
  return request({
    url: '/bpm/oa/leave/get',
    method: 'get',
  	data
  })
}

// 查询用户假期剩余天数
export const useVacation = async (data) => {
  return request({
    url: '/oa/user-leave/surplusDay',
    method: 'post',
  	data
  })
}
// // 接口 /admin-api/oa/user-leave/surplusDay
// export const useVacation = (data) => {
//   return request.post({ url: '/oa/user-leave/surplusDay', data })
// }
